using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Xml;
using System.IO;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Common;

namespace LocalizationToolkit_DAL
{
    public class Localization
    {
        protected SqlConnection sqlToolkit2Conn;
        protected SqlCommand cmd;

        public Localization() {
            this.sqlToolkit2Conn = new SqlConnection();
            this.sqlToolkit2Conn.ConnectionString =
                ConfigurationManager.ConnectionStrings["LocalizationData"].ConnectionString;
        }

        protected DataSet ExecuteDatabaseCommand(DataSet ds)
        {
            cmd.Connection = sqlToolkit2Conn;
            Database db = DatabaseFactory.CreateDatabase("LocalizationData");
            ds = db.ExecuteDataSet(cmd);
            return ds;
        }

        protected int ExecuteNonQuery()
        {
            cmd.Connection = sqlToolkit2Conn;
            Database db = DatabaseFactory.CreateDatabase("LocalizationData");
            return db.ExecuteNonQuery(cmd);

        }
    }
}
